1 Gourmet Coffee These handy blocks of information will help you explore the many different parts of the Visual Basic Scripting language. You'll find all the parts of the VBScript language listed alphabetically under the Alphabetic Keyword List. But if you want to examine just one category, say, objects, each language category has its own, more compact section. How's it work? Click on one of the headings to the left to display a list of items contained in that category. From this list, select the topic that you want to view. Once you've opened that topic, you can easily link to other related sections. So, go ahead and take a look! Study some statements, mull over the methods, or figure out a few functions. You'll see just how versatile the VBScript language can be! 85 85.99 8599 2/2/98 15:55:34 3 icon.gif 1 Gourmet Coffee These handy blocks of information will help you explore the many different parts of the Visual Basic Scripting language. You'll find all the parts of the VBScript language listed alphabetically under the Alphabetic Keyword List. But if you want to examine just one category, say, objects, each language category has its own, more compact section. How's it work? Click on one of the headings to the left to display a list of items contained in that category. From this list, select the topic that you want to view. Once you've opened that topic, you can easily link to other related sections. So, go ahead and take a look! Study some statements, mull over the methods, or figure out a few functions. You'll see just how versatile the VBScript language can be! 85 85.99 8599 2/2/98 15:55:34 3 icon0.gif 1 Gourmet Coffee These handy blocks of information will help you explore the many different parts of the Visual Basic Scripting language. You'll find all the parts of the VBScript language listed alphabetically under the Alphabetic Keyword List. But if you want to examine just one category, say, objects, each language category has its own, more compact section. How's it work? Click on one of the headings to the left to display a list of items contained in that category. From this list, select the topic that you want to view. Once you've opened that topic, you can easily link to other related sections. So, go ahead and take a look! Study some statements, mull over the methods, or figure out a few functions. You'll see just how versatile the VBScript language can be! 85 85.99 8599 2/2/98 15:55:34 3 icon1.gif 1 Gourmet Coffee These handy blocks of information will help you explore the many different parts of the Visual Basic Scripting language. You'll find all the parts of the VBScript language listed alphabetically under the Alphabetic Keyword List. But if you want to examine just one category, say, objects, each language category has its own, more compact section. How's it work? Click on one of the headings to the left to display a list of items contained in that category. From this list, select the topic that you want to view. Once you've opened that topic, you can easily link to other related sections. So, go ahead and take a look! Study some statements, mull over the methods, or figure out a few functions. You'll see just how versatile the VBScript language can be! password 85 85.99 8599 2/2/98 15:55:34 3 icon4.gif icon5.gif {E569EB9D-DB32-11D2-BC5A-00C04F72DB3C} s<U>a</U>mple 0 - disabled a Open 0 open 0 tooltip Dept Name 0 department name 0 tooltip error in department name enter name Dept Description 0 department description 0 tooltip error in department description enter description Tag Number 0 tag number 0 tooltip tag number must be a whole number between 5 and 100 inclusive enter tag number Percent Off 0 percent off 0 tooltip percent off must be a decimal number between 0 and 100 inclusive enter percent off List Price 0 list price 0 tooltip list price must be a US currency value between 1 and 9999 inclusive enter list price Start Date 0 start date 0 tooltip start date must be in the format mm/dd/yyyy enter start date File Name 0 enter File Name browse for a file File Name 0 tooltip [a-z0-9]*\.gif File name must end in '.gif' sa<U>m</U>ple 1 - readonly m Open 1 open 1 tooltip Dept Name 1 department name 1 tooltip error in department name enter name Dept Description 1 department description 1 tooltip error in department description enter description Tag Number 1 tag number 1 tooltip tag number must be a whole number between 5 and 100 inclusive enter tag number Percent Off 1 percent off 1 tooltip percent off must be a decimal number between 0 and 100 inclusive enter percent off List Price 1 list price 1 tooltip list price must be a US currency value between 1 and 9999 inclusive enter list price Start Date 1 start date 1 tooltip start date must be in the format mm/dd/yyyy enter start date File Name 1 enter File Name browse for a file File Name 1 tooltip [a-z0-9]*\.gif File name must end in '.gif' this won't display (no title) 1 Open 4 open 4 tooltip Dept Name 4 department name 4 tooltip error in department name enter name Dept Description 4 department description 4 tooltip error in department description enter description Password password 4 tooltip enter password password must be at least 3 characters in length Tag Number 4 tag number 4 tooltip tag number must be a whole number between 5 and 100 inclusive enter tag number Percent Off 4 percent off 4 tooltip percent off must be a decimal number between 0 and 100 inclusive enter percent off List Price 4 list price 4 tooltip list price must be a US currency value between 1 and 9999 inclusive enter list price Start Date 4 start date 4 tooltip start date must be in the format mm/dd/yyyy enter start date File Name 4 enter File Name browse for a file File Name 4 tooltip [a-z0-9]*\.gif File name must end in '.gif' <U>s</U>ample s Open open tooltip Dept Name department name tooltip error in department name enter name Dept Description department description tooltip error in department description enter description Tag Number tag number tooltip tag number must be a whole number between 5 and 100 inclusive enter tag number Percent Off percent off tooltip percent off must be a decimal number between 0 and 100 inclusive enter percent off List Price list price tooltip list price must be a US currency value between 1 and 9999 inclusive enter list price Start Date start date tooltip start date must be in the format mm/dd/yyyy enter start date File Name enter File Name browse for a file File Name Tooltip [a-z0-9]*\.gif File name must end in '.gif' s<U>u</U>b groups u <U>t</U>emplate t browse for a file [a-z0-9]*\.gif File name must end in '.gif' <enter File name
Last updated on 5/15/01

EditSheet Widget

/widgets/editHTC/editsheet.htc

The EditSheet is the workhorse of an edit page. It can display an editable form in a preformated table or in a template of free-form DHTML. The EditSheet also enables sophisticated control of each field (for more detail on fields see the EditField reference). When not using a template to freely format your EditSheet group with DHTML, fields are listed in a table format in the order that the fields are specified in the meta-data.

required = false
 
dirty = false
 
valid = true

Loading Property Groups...

Test:  

 


events

onError
fires on error (when m_bDebug = true in HTC, shows alert as well)

event object properties

window.event.error String. Returns error detail.

onChange
fires when any sub-control value is changed.
onRequire
fires when required status changes on any sub-control

event object properties

window.event.required Boolean. Returns true if any sub-control is marked as required and is currently empty, false otherwise

onValid
fires when valid status changes on any sub-control

event object properties

window.event.valid Boolean. Returns false if any sub-control is currently invalid, true otherwise

methods

set elEditField = elEditSheet.field(sFieldId)
Gets the sub-control field element (HTML element with HTC attached)

parameters

sFieldId Required. ID of field (column/field name in recordset). May be field in standard EditSheet layout or template. Also includes EditFields embedded in an EditSheet template

return value

HTMLElement. Returns the sub-control element for the field if sFieldId is a valid field in the elEditSheet, null otherwise

remarks

Once you have used this method to get a field control element you can use any of the methods and properties available to an EditField control. Please see the EditField reference for details.

bHidden = elEditSheet.hidden(sFieldId)
Gets the current hidden state of the control row

parameters

sFieldId Required. ID of field (column/field name in recordset). May only be field in standard EditSheet layout, not template.

return value

Boolean. true if hidden, false if not

elEditSheet.hide(sFieldId)
Hides the field row

parameters

sFieldId Required. ID of field (column/field name in recordset). May only be field in standard EditSheet layout, not template.

return value

none

elEditSheet.show(sFieldId)
Shows the field row

parameters

sFieldId Required. ID of field (column/field name in recordset). May only be field in standard EditSheet layout, not template.

return value

none

elEditSheet.focus()
sets focus to the control (if control not disabled)

parameters

none

return value

none

elEditSheet.resetDefault()
resets all subcontrol values for fields that have field nodes in the EditSheet metaData to the default set for that control, or an empty string if no default set

parameters

none

return value

none

elEditSheet.resetDirty()
resets dirty to false

parameters

none

return value

none

container attributes (set on element using EditSheet behavior)

DataXML xml data (from a recordset) data-island id. Usually in the format:
	<document>
		<record>
			<fieldId1>fieldValue1</fieldId1>
			<fieldId2>fieldValue2</fieldId2>
			...
		</record>
		...
	</document>
MetaXML xml meta-data data-island id

scriptable properties

bValue = elEditSheet.dirty
Read-only. Returns true if any field value's in the control have been changed, false otherwise.
bValue = elEditSheet.required
Read-only. Returns true if any field in the EditSheet is required and currently has no value, false otherwise. OnRequire event fires when this value changes.
bValue = elEditSheet.valid
Read-only. Returns false if any field in the EditSheet is currently invalid, true otherwise. OnValid event fires when this value changes.

meta-xml

KEY:     <NodeTag>     <RepeatingNodeTag*>     @attribute

sample

<xml id='esMeta'>
  <editsheets>
	<editsheet>
	  <global expanded='no'>
		<name>&lt;U&gt;d&lt;/U&gt;epartment</name>
		<key>d</key>
	  </global>
	  <fields>
		<text id='dept_name' required='yes' readonly='yes' maxlen='50'>
		  <name>Dept Name</name>
		  <tooltip>tooltip for dept_name</tooltip>
		  <charmask></charmask>
		  <error>error for dept_name</error>
		</text>
		<text id='dept_desc' required='yes' maxlen='30' subtype='long'>
		  <name>Description</name>
		  <tooltip>tooltip for dept_desc</tooltip>
		  <charmask></charmask>
		  <error>error for dept_desc</error>
		</text>
	  </fields>
	</editsheet>
	<editsheet>
	  <global expanded='yes'>
		<name>&lt;U&gt;t&lt;/U&gt;emplate</name>
		<key>t</key>
	  </global>
	  <fields>
		<select id='deptid'>
		  <name>Department</name>
		  <tooltip>tooltip for deptid</tooltip>
		  <select id='deptid'>
			<option value='1'>dept 1</option>
			<option value='2'>dept 2</option>
			<option value='3'>dept 3</option>
		  </select>
		</select>
		<numeric id='sku' required='yes' min='0' max='10000' subtype='integer'>
		  <name>SKU</name>
		  <tooltip>tooltip for sku</tooltip>
		  <error>error for sku</error>
		</numeric>
	  </fields>
	  <template fields='deptid sku' register='checkbox1'><![CDATA[
		<B>Department id:</B>
		<DIV ID='deptid' STYLE='WIDTH: 300px'
		  MetaXML='esMeta'
		  DataXML='esData'><H3 ALIGN="center">Loading property...</H3>
		</DIV>
		<B>Sku:</B>
		<DIV ID='sku' STYLE='WIDTH: 300px'
		  MetaXML='esMeta'
		  DataXML='esData'><H3 ALIGN="center">Loading property...</H3>
		</DIV>
		<BR>
		<INPUT type="checkbox" id=checkbox1 name=checkbox1><LABEL FOR=checkbox1>additional HTML controls</LABEL>
	  ]]></template>
	</editsheet>
  </editsheets>
</xml>